class Solution:
    def replaceSpace(self, s: str) -> str:
        str_array = []

        for i in s:
            if i==' ':
                str_array.append("%20")
                continue
            str_array.append(i)
        return "".join(str_array)